// 风险分级区域划分
import request from "@/utils/request.js";


//查询
export function listRisk (areaName){
  return request({
    url: `/system/area/list/`,
    method: 'get',
    // data
  })
}


//新增
export function addRisk (data){
  return request({
    url: '/system/area',
    method: 'post',
    data
  })
}

//编辑
export function editRisk (data){
  return request({
    url: '/system/area',
    method: 'put',
    data
  })
}

//删除
export function deleteRisk (ids){
  return request({
    url: `/system/area/${ids}`,
    method: 'delete',
  })
}

//导出
export function exportRisk (data){
  return request({
    url: `/system/area/export`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

//详情
export function detailRisk (areaId){
  return request({
    url: `/system/area/${areaId}`,
    method: 'get',

  })
}
//获取树列表
export function treeRisk(params) {
  return request({
    url: `/system/area/AreaTree`,
    method: 'get',
    params
  })
}

